Method, apparatus and computer program product for processing of images

ABSTRACT

In accordance with an example embodiment a method, apparatus and computer program product are provided. The method comprises determining a plurality of first pixels having resemblance with a second pixel associated with an image based on a depth information of the image. The method further comprises replacing the second pixel by at least one first pixel of the plurality of first pixels based on a determination that the at least one first pixel is not associated with the at least one image defect.

TECHNICAL FIELD

Various implementations relate generally to method, apparatus, andcomputer program product for processing of images.

BACKGROUND

The rapid advancement in technology related to capturing multimediacontent, such as images and videos has resulted in an exponentialincrease in the creation of image content. Various devices like mobilephones and personal digital assistants (PDA) are being configured withimage/video capture capabilities, thereby facilitating easy capture ofthe multimedia content such as images/videos. The quality of capturedimages may be affected based on various factors such as lens shadingartifacts, quality of image sensors associated with image capturingdevice, and the like. The captured images may be subjected to processingbased on various user needs. For example, images captured correspondingto a scene may be edited or processed to generate quality images thatmay be devoid of defects such as lens shading defects, bad pixeldefects, and the like.

SUMMARY OF SOME EMBODIMENTS

Various aspects of example embodiments are set out in the claims.

In a first aspect, there is provided a method comprising: determining aplurality of first pixels having resemblance with a second pixelassociated with an image based on a depth information of the image, thesecond pixel being associated with at least one image defect; andreplacing the second pixel by at least one first pixel of the pluralityof first pixels based on a determination that the at least one firstpixel is not associated with the at least one image defect.

In a second aspect, there is provided an apparatus comprising at leastone processor; and at least one memory comprising computer program code,the at least one memory and the computer program code configured to,with the at least one processor, cause the apparatus to at leastperform: determine a plurality of first pixels having resemblance with asecond pixel associated with an image based on a depth information ofthe image, the second pixel being associated with at least one imagedefect; and replace the second pixel by at least one first pixel of theplurality of first pixels based on a determination that the at least onefirst pixel is not associated with at least one of the image defect.

In a third aspect, there is provided a computer program productcomprising at least one computer-readable storage medium, thecomputer-readable storage medium comprising a set of instructions,which, when executed by one or more processors, cause an apparatus to atleast perform: determine a plurality of first pixels having resemblancewith a second pixel associated with an image based on a depthinformation of the image, the second pixel being associated with atleast one image defect; and replace the second pixel by at least onefirst pixel of the plurality of first pixels based on a determinationthat the at least one first pixel is not associated with at least one ofthe image defect.

In a fourth aspect, there is provided an apparatus comprising: means fordetermining a plurality of first pixels having resemblance with a secondpixel associated with an image based on a depth information of theimage, the second pixel being associated with at least one image defect;and means for replacing the second pixel by at least one first pixel ofthe plurality of first pixels based on a determination that the at leastone first pixel is not associated with at least one of the image defect.

In a fifth aspect, there is provided a computer program comprisingprogram instructions which when executed by an apparatus, cause theapparatus to: determine a plurality of first pixels having resemblancewith a second pixel associated with an image based on a depthinformation of the image, the second pixel being associated with atleast one image defect; and replace the second pixel by at least onefirst pixel of the plurality of first pixels based on a determinationthat the at least one first pixel is not associated with at least one ofthe image defect.

BRIEF DESCRIPTION OF THE FIGURES

Various embodiments are illustrated by way of example, and not by way oflimitation, in the figures of the accompanying drawings in which:

FIG. 1 illustrate an example image in accordance with an exampleembodiment;

FIG. 2 illustrates a device for processing of images in accordance withan example embodiment;

FIG. 3 illustrates an apparatus for processing of images in accordancewith an example embodiment;

FIG. 4 illustrate example configuration of a device for capturing theimage in accordance with example embodiments;

FIGS. 5A, 5B and 5C illustrate example image and portions thereof forprocessing of the image in accordance with an example embodiment;

FIG. 6 illustrates a flowchart depicting an example method forprocessing of images in accordance with an example embodiment; and

FIG. 7 illustrates a flowchart depicting an example method forprocessing of images in accordance with another example embodiment.

DETAILED DESCRIPTION

Example embodiments and their potential effects are understood byreferring to FIGS. 1 through 7 of the drawings.

Various embodiments relate to processing of images to generate aprocessed image that may be devoid of image defects such as bad pixeldefects and lens shading defects. In an embodiment, the image may be alight-field image. As used herein, the terms ‘light-field image’ mayrefer to an infinite collection of vectors representative of the lightconverging at a point from all possible angles in three dimension (3D).A light-field image is a complete representation of a visual scene andcontains all possible views of the scene. The light-field imagecomprises an angular information, for example, a four dimension (4D)information of all the light rays associated with the scene in 3D. Anexemplary light-field image is illustrated with reference to FIG. 1. Inan embodiment, the image may be captured by utilizing a light-fieldimage capturing device, such as a plenoptic camera.

FIG. 1 illustrates an example of a light-field image 102 in accordancewith an embodiment. As illustrated herein, the light-field image 102comprises a 2D image that includes a plurality of small imagesassociated with a scene. The plurality of small images may be termed asan array of “micro-images”. In an embodiment, each of the micro-imagesassociated with the scene may comprise depth information associated withthe scene. In an embodiment, a device configured to capture thelight-field image (for example, a light-field camera) may include anarray of micro lenses that enables the light-field camera to record notonly image intensity, but also the distribution of intensity indifferent directions at each point. For generating an image from thelight-field image, pixels from multiple micro-images may be selected. Anexample configuration of a micro-lenses in a device configured tocapture a light-field image is illustrated and described in FIG. 4. Anexample device configured for capturing light-field image along withvarious components thereof is disclosed in FIG. 3.

FIG. 2 illustrates a device 200 in accordance with an exampleembodiment. It should be understood, however, that the device 200 asillustrated and hereinafter described is merely illustrative of one typeof device that may benefit from various embodiments, therefore, shouldnot be taken to limit the scope of the embodiments. As such, it shouldbe appreciated that at least some of the components described below inconnection with the device 200 may be optional and thus in an exampleembodiment may include more, less or different components than thosedescribed in connection with the example embodiment of FIG. 1. Thedevice 200 could be any of a number of types of mobile electronicdevices, for example, portable digital assistants (PDAs), pagers, mobiletelevisions, gaming devices, cellular phones, all types of computers(for example, laptops, mobile computers or desktops), cameras,audio/video players, radios, global positioning system (GPS) devices,media players, mobile digital assistants, or any combination of theaforementioned, and other types of communications devices.

The device 200 may include an antenna 202 (or multiple antennas) inoperable communication with a transmitter 204 and a receiver 206. Thedevice 200 may further include an apparatus, such as a controller 208 orother processing device that provides signals to and receives signalsfrom the transmitter 204 and receiver 206, respectively. The signals mayinclude signaling information in accordance with the air interfacestandard of the applicable cellular system, and/or may also include datacorresponding to user speech, received data and/or user generated data.In this regard, the device 200 may be capable of operating with one ormore air interface standards, communication protocols, modulation types,and access types. By way of illustration, the device 200 may be capableof operating in accordance with any of a number of first, second, thirdand/or fourth-generation communication protocols or the like. Forexample, the device 200 may be capable of operating in accordance withsecond-generation (2G) wireless communication protocols IS-136 (timedivision multiple access (TDMA)), GSM (global system for mobilecommunication), and IS-95 (code division multiple access (CDMA)), orwith third-generation (3G) wireless communication protocols, such asUniversal Mobile Telecommunications System (UMTS), CDMA2000, widebandCDMA (WCDMA) and time division-synchronous CDMA (TD-SCDMA), with 3.9Gwireless communication protocol such as evolved-universal terrestrialradio access network (E-UTRAN), with fourth-generation (4G) wirelesscommunication protocols, or the like. As an alternative (oradditionally), the device 200 may be capable of operating in accordancewith non-cellular communication mechanisms. For example, computernetworks such as the Internet, local area network, wide area networks,and the like; short range wireless communication networks such asBluetooth® networks, Zigbee® networks, Institute of Electric andElectronic Engineers (IEEE) 802.11x networks, and the like; wirelinetelecommunication networks such as public switched telephone network(PSTN).

The controller 208 may include circuitry implementing, among others,audio and logic functions of the device 200. For example, the controller208 may include, but are not limited to, one or more digital signalprocessor devices, one or more microprocessor devices, one or moreprocessor(s) with accompanying digital signal processor(s), one or moreprocessor(s) without accompanying digital signal processor(s), one ormore special-purpose computer chips, one or more field-programmable gatearrays (FPGAs), one or more controllers, one or moreapplication-specific integrated circuits (ASICs), one or morecomputer(s), various analog to digital converters, digital to analogconverters, and/or other support circuits. Control and signal processingfunctions of the device 200 are allocated between these devicesaccording to their respective capabilities. The controller 208 thus mayalso include the functionality to convolutionally encode and interleavemessage and data prior to modulation and transmission. The controller208 may additionally include an internal voice coder, and may include aninternal data modem. Further, the controller 208 may includefunctionality to operate one or more software programs, which may bestored in a memory. For example, the controller 208 may be capable ofoperating a connectivity program, such as a conventional Web browser.The connectivity program may then allow the device 200 to transmit andreceive Web content, such as location-based content and/or other webpage content, according to a Wireless Application Protocol (WAP),Hypertext Transfer Protocol (HTTP) and/or the like. In an exampleembodiment, the controller 208 may be embodied as a multi-core processorsuch as a dual or quad core processor. However, any number of processorsmay be included in the controller 208.

The device 200 may also comprise a user interface including an outputdevice such as a ringer 210, an earphone or speaker 212, a microphone214, a display 216, and a user input interface, which may be coupled tothe controller 208. The user input interface, which allows the device200 to receive data, may include any of a number of devices allowing thedevice 200 to receive data, such as a keypad 218, a touch display, amicrophone or other input device. In embodiments including the keypad218, the keypad 218 may include numeric (0-9) and related keys (#, *),and other hard and soft keys used for operating the device 200.Alternatively or additionally, the keypad 218 may include a conventionalQWERTY keypad arrangement. The keypad 218 may also include various softkeys with associated functions. In addition, or alternatively, thedevice 200 may include an interface device such as a joystick or otheruser input interface. The device 200 further includes a battery 220,such as a vibrating battery pack, for powering various circuits that areused to operate the device 200, as well as optionally providingmechanical vibration as a detectable output.

In an example embodiment, the device 200 includes a media capturingelement, such as a camera, video and/or audio module, in communicationwith the controller 208. The media capturing element may be any meansfor capturing an image, video and/or audio for storage, display ortransmission. In an example embodiment, the media capturing element is acamera module 222 which may include a digital camera capable of forminga digital image file from a captured image. As such, the camera module222 includes all hardware, such as a lens or other optical component(s),and software for creating a digital image file from a captured image.Alternatively or additionally, the camera module 222 may include thehardware needed to view an image, while a memory device of the device200 stores instructions for execution by the controller 208 in the formof software to create a digital image file from a captured image. In anexample embodiment, the camera module 222 may further include aprocessing element such as a co-processor, which assists the controller208 in processing image data and an encoder and/or decoder forcompressing and/or decompressing image data. In an embodiment, theprocessor may be configured to perform processing of the co-processor.For example, the processor may facilitate the co-processor to processthe image data and the encoder and/or the decoder. The encoder and/ordecoder may encode and/or decode according to a JPEG standard format oranother like format. For video, the encoder and/or decoder may employany of a plurality of standard formats such as, for example, standardsassociated with H.261, H.262/MPEG-2, H.263, H.264, H.264/MPEG-4, MPEG-4,and the like. In some cases, the camera module 222 may provide liveimage data to the display 216. In an example embodiment, the display 216may be located on one side of the device 200 and the camera module 222may include a lens positioned on the opposite side of the device 200with respect to the display 216 to enable the camera module 222 tocapture images on one side of the device 200 and present a view of suchimages to the user positioned on the other side of the device 200.

The device 200 may further include a user identity module (UIM) 224. TheUIM 224 may be a memory device having a processor built in. The UIM 224may include, for example, a subscriber identity module (SIM), auniversal integrated circuit card (UICC), a universal subscriberidentity module (USIM), a removable user identity module (R-UIM), or anyother smart card. The UIM 224 typically stores information elementsrelated to a mobile subscriber. In addition to the UIM 224, the device200 may be equipped with memory. For example, the device 200 may includevolatile memory 226, such as volatile random access memory (RAM)including a cache area for the temporary storage of data. The device 200may also include other non-volatile memory 228, which may be embeddedand/or may be removable. The non-volatile memory 228 may additionally oralternatively comprise an electrically erasable programmable read onlymemory (EEPROM), flash memory, hard drive, or the like. The memories maystore any number of pieces of information, and data, used by the device200 to implement the functions of the device 200.

FIG. 3 illustrates an apparatus 300 for processing of images inaccordance with an example embodiment. The apparatus 300 for processingof images may be employed, for example, in the device 200 of FIG. 2.However, it should be noted that the apparatus 300, may also be employedon a variety of other devices both mobile and fixed, and therefore,embodiments should not be limited to application on devices such as thedevice 200 of FIG. 2. Alternatively, embodiments may be employed on acombination of devices including, for example, those listed above.Accordingly, various embodiments may be embodied wholly at a singledevice, (for example, the device 200 or in a combination of devices). Itshould also be noted that the devices or elements described below maynot be mandatory and thus some may be omitted in certain embodiments.

The apparatus 300 includes or otherwise is in communication with atleast one processor 302 and at least one memory 304. Examples of the atleast one memory 304 include, but are not limited to, volatile and/ornon-volatile memories. Some examples of the volatile memory include, butare not limited to, random access memory, dynamic random access memory,static random access memory, and the like. Some example of thenon-volatile memory includes, but are not limited to, hard disks,magnetic tapes, optical disks, programmable read only memory, erasableprogrammable read only memory, electrically erasable programmable readonly memory, flash memory, and the like. The memory 304 may beconfigured to store information, data, applications, instructions or thelike for enabling the apparatus 300 to carry out various functions inaccordance with various example embodiments. For example, the memory 304may be configured to buffer input data comprising multimedia content forprocessing by the processor 302. Additionally or alternatively, thememory 304 may be configured to store instructions for execution by theprocessor 302.

An example of the processor 302 may include the controller 208. Theprocessor 302 may be embodied in a number of different ways. Theprocessor 302 may be embodied as a multi-core processor, a single coreprocessor; or combination of multi-core processors and single coreprocessors. For example, the processor 302 may be embodied as one ormore of various processing means such as a coprocessor, amicroprocessor, a controller, a digital signal processor (DSP),processing circuitry with or without an accompanying DSP, or variousother processing devices including integrated circuits such as, forexample, an application specific integrated circuit (ASIC), a fieldprogrammable gate array (FPGA), a microcontroller unit (MCU), a hardwareaccelerator, a special-purpose computer chip, or the like. In an exampleembodiment, the multi-core processor may be configured to executeinstructions stored in the memory 304 or otherwise accessible to theprocessor 302. Alternatively or additionally, the processor 302 may beconfigured to execute hard coded functionality. As such, whetherconfigured by hardware or software methods, or by a combination thereof,the processor 302 may represent an entity, for example, physicallyembodied in circuitry, capable of performing operations according tovarious embodiments while configured accordingly. For example, if theprocessor 302 is embodied as two or more of an ASIC, FPGA or the like,the processor 302 may be specifically configured hardware for conductingthe operations described herein. Alternatively, as another example, ifthe processor 302 is embodied as an executor of software instructions,the instructions may specifically configure the processor 302 to performthe algorithms and/or operations described herein when the instructionsare executed. However, in some cases, the processor 302 may be aprocessor of a specific device, for example, a mobile terminal ornetwork device adapted for employing embodiments by furtherconfiguration of the processor 302 by instructions for performing thealgorithms and/or operations described herein. The processor 302 mayinclude, among other things, a clock, an arithmetic logic unit (ALU) andlogic gates configured to support operation of the processor 302.

A user interface 306 may be in communication with the processor 302.Examples of the user interface 306 include, but are not limited to,input interface and/or output user interface. The input interface isconfigured to receive an indication of a user input. The output userinterface provides an audible, visual, mechanical or other output and/orfeedback to the user. Examples of the input interface may include, butare not limited to, a keyboard, a mouse, a joystick, a keypad, a touchscreen, soft keys, and the like. Examples of the output interface mayinclude, but are not limited to, a display such as light emitting diodedisplay, thin-film transistor (TFT) display, liquid crystal displays,active-matrix organic light-emitting diode (AMOLED) display, amicrophone, a speaker, ringers, vibrators, and the like. In an exampleembodiment, the user interface 306 may include, among other devices orelements, any or all of a speaker, a microphone, a display, and akeyboard, touch screen, or the like. In this regard, for example, theprocessor 302 may comprise user interface circuitry configured tocontrol at least some functions of one or more elements of the userinterface 306, such as, for example, a speaker, ringer, microphone,display, and/or the like. The processor 302 and/or user interfacecircuitry comprising the processor 302 may be configured to control oneor more functions of one or more elements of the user interface 306through computer program instructions, for example, software and/orfirmware, stored on a memory, for example, the at least one memory 304,and/or the like, accessible to the processor 302.

In an example embodiment, the apparatus 300 may include an electronicdevice. Some examples of the electronic device include communicationdevice, media capturing device with communication capabilities,computing devices, and the like. Some examples of the communicationdevice may include a mobile phone, a personal digital assistant (PDA),and the like. Some examples of computing device may include a laptop, apersonal computer, and the like. In an example embodiment, thecommunication device may include a user interface, for example, the UI306, having user interface circuitry and user interface softwareconfigured to facilitate a user to control at least one function of thecommunication device through use of a display and further configured torespond to user inputs. In an example embodiment, the communicationdevice may include a display circuitry configured to display at least aportion of the user interface of the communication device. The displayand display circuitry may be configured to facilitate the user tocontrol at least one function of the communication device.

In an example embodiment, the communication device may be embodied as toinclude a transceiver. The transceiver may be any device operating orcircuitry operating in accordance with software or otherwise embodied inhardware or a combination of hardware and software. For example, theprocessor 302 operating under software control, or the processor 302embodied as an ASIC or FPGA specifically configured to perform theoperations described herein, or a combination thereof, therebyconfigures the apparatus or circuitry to perform the functions of thetransceiver. The transceiver may be configured to receive multimediacontent. Examples of multimedia content may include audio content, videocontent, data, and a combination thereof.

In an example embodiment, the communication device may be embodied as toinclude an image sensor, such as an image sensor 308. The image sensor308 may be in communication with the processor 302 and/or othercomponents of the apparatus 300. The image sensor 308 may be incommunication with other imaging circuitries and/or software, and isconfigured to capture digital images or to make a video or other graphicmedia files. The image sensor 308 and other circuitries, in combination,may be an example of the camera module 222 of the device 200.

The components 302-308 may communicate with each other via a centralizedcircuit system 310 to perform generation of the processed multimediacontent. The centralized circuit system 310 may be various devicesconfigured to, among other things, provide or enable communicationbetween the components 302-308 of the apparatus 300. In certainembodiments, the centralized circuit system 310 may be a central printedcircuit board (PCB) such as a motherboard, main board, system board, orlogic board. The centralized circuit system 310 may also, oralternatively, include other printed circuit assemblies (PCAs) orcommunication channel media.

In an example embodiment, the processor 302 is caused to, with thecontent of the memory 304, and optionally with other componentsdescribed herein, to cause the apparatus 300 to process an imageassociated with a scene. In an embodiment, the image may be pre-recordedand stored in the apparatus 300. In another embodiment, the image may becaptured by utilizing the camera module 222 of the device 200, andstored in the memory of the device 200. In yet another embodiment, thedevice 200 may receive the image from internal memory such as harddrive, random access memory (RAM) of the apparatus 300, or from externalstorage medium such as digital versatile disk, compact disk, flashdrive, memory card, or from external storage locations through Internet,Bluetooth®, and the like. The apparatus 300 may also receive the imagefrom the memory 304.

In an embodiment, the image may be a light-field image. As discussedwith reference to FIG. 1, the term light-field image′ may refer to aninfinite collection of vectors representative of the light converging ata point from all possible angles in 3D. In an embodiment, the image mayinclude a plurality of pixels. In an embodiment, the image may becaptured by utilizing a light-field image capturing device, for example,a light-field camera. An example of the light-field image capturingdevice may be a plenoptic camera.

In order to get a high resolution output, the sensors associated withthe light-field camera are of higher resolution. As such, for generatingimages with less pixel defects, the sensor yields may be lower therebyincreasing the overall cost associated with the light-field camera. Thedisclosed methods and apparatus may be utilized for correcting imagedefects such as bad pixel defects and vignette defects, therebyfacilitating in increasing the yield and reducing the cost associatedwith the light-field camera. In an embodiment, the bad pixel defects mayalso include cluster defects, row/column defects, and the likeassociated with the images. As used herein, ‘cluster defects’ may referto a cluster of bad pixels, for example, n×m consecutive pixels that maybe bad. In addition, row/column defects refer to bad pixels wherein acomplete row/column of the sensors comprises of bad pixels. Sincelight-field cameras are capable of providing multiple similar pixelshaving resemblance to each other corresponding to every scene point,thus for correcting defects such as cluster defects, row/column defects,the multiple resembling pixels associated with a scene point may beexploited. The multiple similar pixels having resemblance to each othermay hereinafter be referred to as ‘resembling pixels’. In an embodiment,the terms such as ‘similar pixels’ or ‘pixels having resemblance’ may beconstrued as referring to the pixels that may correspond to the sameportion of the image, but casted under different micro-lens.Accordingly, in some embodiments, the similar pixels or the resemblingpixels may be associated with substantially same intensity values. Insome embodiments, the plurality of first pixels may be replica of thesecond pixel, without at least one image defect in the second pixel, andmay be referred to as ‘replica pixels’. In an example embodiment, theintensity values of the resembling pixels may be derived from theimmediate spatial neighborhood (under the same micro-lens) as well asfrom neighboring micro-lens (where the same view is likely to berepeated). Thus, the derived intensity values associated with theresembling pixels may be utilized for correcting the image defectsassociated with the light-field images.

In an embodiment, a determination of the resembling pixel in alight-field image may depend on the depth estimation of every pixel inthe captured light-field image. In an embodiment, multiple resemblingpixels of a scene point under various micro-lenses may be utilized forrobustly estimating the depth of each pixel in the captured light-fieldimage, thereby reliably determining the pixel to be replaced from theneighboring micro-lenses for a defective (for example, bad) pixel in thecurrent micro-lens.

In an embodiment, the processor 302 is caused to, with the content ofthe memory 304, and optionally with other components described herein,to cause the apparatus 300 to determine a plurality of first pixels ofthe plurality of pixels having resemblance with a second pixel. In anembodiment, the second pixel may be associated with at least one imagedefect. In some embodiments, the at least one image defect may includeat least one of a vignette pixel and a bad pixel. In an embodiment,determining the first pixel being the bad pixel comprises determiningthose pixels that do not perform as expected. For example, the pixel mayappear as a black spot or a white spot in the image. Various examples ofbad pixels include stuck high pixel, stuck low pixel, hot pixel, coldpixel, a pixel from a group of bad pixels forming a cluster, a pixelfrom a group of bad pixels forming along a row or a column. The term‘stuck pixel’ may be construed as referring to a pixel that may appearas a bright dot of color that is most evident when rest of the image isblack. A stuck pixel reads high on all photos taken, regardless of anexposure time. The term ‘hot pixel’ may refer to pixels associated withindividual sensors on a CCD sensor of a camera that have higher thannormal rates of charge leakage, thereby causing them to appear as smallpixel-sized bright points of light in images. In other word, a hot pixelis a pixel that reads high (i.e., appears very bright) on longexposures, for example, night-time scenes.

In an embodiment, the bad pixels may be determined based on the pixelintensities of the resembling pixels of the first pixel that are castedunder different (for example, neighboring) micro-lenses. For example,while traversing (for example, in a from one micro-lens towards another,if there is a spike in a value of the pixel intensity associated withthe same pixel casted under different micro-lenses, then it may bedetermined that the pixel is bad pixel. In another embodiment, a pixelintensity value associated with other neighboring pixels casted underthe same micro-lens may be determined. If it is determined, that thereis a substantial difference between the intensity values of a pixel ascompared to the rest of the pixels casted under the same micro-lens,then the pixel may be determined to be a bad pixel.

In an embodiment, determining the second pixel being the vignette pixelcomprises determining a pixel associated with a low intensity ascompared to an expected intensity. In particular, the vignette pixel maybe determined by performing determination of pixel intensity of pixelsappearing at an edge portion of an image. For instance, on traversing ina radial direction in an image (for example, on moving from centralportion towards the edges/corners of an image), the intensity of pixelsmay reduce. The phenomenon of this radial drop in intensity on movingfrom the central portion towards the edges/corners of the image sensormay be termed as a ‘lens shading phenomenon’, and the pixels associatedwith the lens shading phenomenon may be termed as vignette pixels. As aresult of lens shading phenomenon, the captured image may be bright andwell-illuminated at the center and the illumination drops off near theedges of the field-of-view of the image.

In an embodiment, the image may include an angular informationassociated with the scene that may be utilized in determining a depthmap of the scene. As used herein, the ‘depth map’ may be construed asreferring to a map illustrating distance between objects of an image.Additionally, the pixels of the image may be represented by numericalinteger values on the depth map. In an embodiment, the depth map of thescene may be generated based on a determination of feature pointsassociated with the scene. Examples of the feature points may include,but are not limited to, corners, edges of an image, or other regions ofinterest such as background region of the scene. In an exampleembodiment, the apparatus 300 is caused to generate a 3-D image of thescene based on the depth map. In an embodiment, the processor 302 iscaused to, with the content of the memory 304, and optionally with othercomponents described herein, to cause the apparatus 300 to determine thedepth map of the image.

In an embodiment, the processor 302 is configured to, with the contentof the memory 304, and optionally with other components describedherein, to cause the apparatus 300 to determine the plurality of firstpixels based on a depth information of the plurality of pixels. Theplurality of first pixels comprises first pixels having resemblance withthe second pixel. In other words, each first pixel of the plurality offirst pixels comprises an image of same portion of the scene castedunder different micro-lenses of the image capturing device. For example,the scene may depict an image of a person, and various micro-lenses ofthe image capturing device may capture/cast the image of person fromdifferent orientations. Accordingly, the same point or portion of ascene casted under or captured by different micro-lenses may beassociated with a different co-ordinate position. A difference betweensuch co-ordinate positions associated with the same pixel casted underdifferent micro-lenses may be termed as a ‘depth offset’ or a shift or adisparity, and may be determined based on the depth informationassociated with the image/scene. In an embodiment, the depth offset maybe associated with a depth of the image. For example, an image of anobject captured in such a manner that the object is placed closer to theimage capturing device may have a higher depth offset as compared to theobject placed farther from the image capturing device.

In an embodiment, the processor 302 is configured to, with the contentof the memory 304, and optionally with other components describedherein, to cause the apparatus 300 to determine whether at least onefirst pixel of the plurality of first pixels is associated with theimage defect. In an embodiment, determination whether the at least onefirst pixel is associated with the image defect comprises determiningwhether the at least one pixel is the vignette pixel or the bad pixel.In an embodiment, if it is determined that the at least one first pixelof the plurality of pixels is not a bad pixel, then the processor 302 isconfigured to, with the content of the memory 304, and optionally withother components described herein, to cause the apparatus 300 to replacethe second pixel by the at least one first pixel of the plurality offirst pixels. In an embodiment, replacing the second pixel with at leastone first pixel may be construed as referring to replacing the pixelintensity of the second pixel with (combined or individual) pixelintensities of the at least one second pixel. For example, if it isdetermined that out of eight first pixels, two first pixels are not badpixels while rest of six pixels are bad pixels, then a function of pixelintensity of the two pixel intensities (of two first pixels which arenot bad pixels) is computed, and the pixel intensity of the second pixelmay be replaced with the computed function of pixel intensities of thetwo first pixels. In an embodiment, the function may refer to arithmeticfunctions such as median, mode, average or any other operator that maybe utilized for determination of a combined or consolidated value of thepixel intensity associated with the at least one first pixels. Inanother embodiment, instead of replacing the pixel intensity of thesecond pixel with the function of pixel intensities of the two firstpixels, the pixel intensity of the second pixel may be replaced with thepixel intensity of one of the two first pixels that is located at acentral portion of the image. For example, the co-ordinates for thesecond pixel may be at a point A (12.5, 12.5) under one micro-lens, andthe same pixel may be at co-ordinates B (15, 15) and C (17.5, 17.5)under two of the neighboring micro-lenses, then, out of the two firstpixels at co-ordinates B and C respectively, the pixel at co-ordinate Bmay be selected for replacing the first pixel if the co-ordinate Bcorresponds to a central portion of the image. In an embodiment, if itis determined that all of the plurality of first pixels are either a badpixel or a vignette pixel, then the second pixel may be replaced byusing an ‘interpolation technique’. The interpolation techniquecomprises interpolating pixel values from neighboring pixel values ofthe current micro-lens, to thereby generate pixel values for currentpixels.

In some example embodiments, an apparatus such as the apparatus 300 maycomprise various components such as means for determining a plurality offirst pixels having resemblance with a second pixel associated with animage based on a depth information of the image, the second pixel beingassociated with at least one image defect; and replacing the secondpixel by at least one first pixel of the plurality of first pixels basedon a determination that the at least one first pixel is not associatedwith the at least one image defect. Such components may be configured byutilizing hardware, firmware and software components. Examples of suchmeans may include, but are not limited to, the processor 302 along withthe memory 304, the UI 306, and the image sensor 308.

In an example embodiment, means for determining the second pixelassociated with the vignette pixel comprises means for performingdetermination of pixel intensity of pixels appearing at an edge portionof the image. In an example embodiment, means for replacing the secondpixel by at least one first pixel comprises replacing a value of pixelintensity of the second pixel with a value of pixel intensity of the atleast one first pixel. In another embodiment, means for replacing thefirst pixel by at least one first pixel comprises means for replacing avalue of pixel intensity of the second pixel with a function value ofpixel intensities of the at least one pixel. In an embodiment, thefunction value may refer to value of pixel intensity computed based onarithmetic functions such as median, mode, average or any other operatorthat may be utilized for determination of a consolidated value of thepixel intensity associated with the at least one first pixels. In yetanother embodiment, means for replacing the first pixel by at least onefirst pixel comprises means for replacing a value of pixel intensity ofthe second pixel with a value of pixel intensity of a pixel located at acentral portion of the image. Examples of such means may include, butare not limited to, the processor 302 along with the memory 304, the UI306, and the image sensor 308. Some embodiments of processing multimediacontent are further described in FIGS. 4 to 7.

FIG. 4 illustrates example configuration of a device 400, in accordancewith an embodiment. In an embodiment, the device 400 is configured tocapture a light-field image. The device 400 may include an array ofmicro-lenses comprising, for example, a micro-lens 402 and a micro-lens404, and an image sensor 406. The array of micro lenses are configuredto create a map of light intensity for an object, for example, an objectlocated at point 408 in the image at an image plane of the main lens. Inan embodiment, the array of micro lenses may be configured at a distance(represented as 410) from the image sensor 406. In an embodiment, theimage sensor 406 may be a charge-coupled device (CCD). In an embodiment,the rays of light may be incident at the optical element, therebygenerating an image, for example, images 412, 414 at an image plane at afocal distance from the optical element. Each micro-lens may split abeam coming towards it from the optical element into rays coming fromdifferent “pinhole” locations on the aperture of the optical element.Each of the rays may be recorded as a pixel on the image sensor 416, andthe pixels under each micro-lens may collectively form an n-pixel image.The n-pixel region under each array of lens may be referred to as amacro-pixel, and the device may generate a micro-image at eachmacro-pixel. The light-field image captured by the device may generateda plurality of micro-images of a scene. An exemplary light-field imageis illustrated and described in FIG. 1. In an embodiment, thelight-field image may be processed for generating an image that isdevoid of image defects such as lens shading defects and pixel defects.In an embodiment, the depth offset associated with the micro-lens may becomputed based on the following expression:P′=P+(1−(B/v))D  (1)

where,

-   -   D is the distance between adjacent micro-lenses, for example        micro-lenses 402, 404.    -   p is the scene point (shown as 408 in FIG. 4) imaged by the        main-lens in front of the micro-lens.    -   v is the distance (shown as 416 in FIG. 4) between the imaged        scene point 408 and the micro-lens array (comprising        micro-lenses 402, 404). The imaged scene point depends on the        depth at which the point is present in front of the image        capturing device. Hence, the distance ‘v’ depends on the depth        of the scene.    -   B is the distance (shown as 410 in FIG. 4) between the        micro-lens array and the sensor.    -   P is the pixel location (shown as 412 in FIG. 4) where the scene        point ‘p’ is imaged for top micro-lens 402 (assuming pin-hole        imaging).    -   P′ is the pixel location (shown as 414 in FIG. 4) where the        scene point ‘p’ is imaged for bottom micro-lens 404 (assuming        pin-hole imaging).

From equation (1), if the depth (i.e., ‘v’) of the scene point is known,then a resembling pixel of the pixel location under differentmicro-lenses may be determined, which may be utilized for performingcorrection of bad pixel defects.

FIGS. 5A, 5B and 5C illustrate an example image 502 and portionsthereof, for example a portion 504 and 506, for processing of the image502 in accordance with an embodiment. As explained with reference toFIG. 1, the image 502 may be a light-field image (for example, thelight-field image 102 illustrated in FIG. 1). FIGS. 5B and 5C illustrateportions 504 and 506, respectively of the image 502. In the exampleimage 502 illustrated in FIG. 5A, the image 502 is shown to includeportions such as a statue 504 and a person 506, such that the statue 504is closer to image capturing device as compared to the person 506. Asalready discussed with reference to FIG. 3, the closer the object isplaced to the image capturing device, more would be the number ofresembling pixels associated with an object in theneighbouring/surrounding micro-lenses. For example, as illustrated inFIGS. 5B and 5C, the resembling (or replica) pixels of the pixelsassociated with an eye portion 508 of the statue 504 in neighbouringmicro-lenses is more than the replicas of pixels associated with theface portion 510 of the person 506. Accordingly, an image captured froma closer location may include more number of resembling pixels ascompared to an image captured from a farther location/distance from theimage capturing device. A method for processing of images, for examplethe image 502 is described in detail with reference to FIG. 6.

FIG. 6 is a flowchart depicting an example method 600 for processing ofimages, in accordance with an example embodiment. The method depicted inthe flow chart may be executed by, for example, the apparatus 300 ofFIG. 3. It may be understood that for describing the method 600,references herein may be made to FIGS. 1 through 5C. In someembodiments, the image may be generated by processing portions of theimage utilizing a light-field image. In an embodiment, the image may bea light-field image. The light-field image comprises an angularinformation, for example, a four dimension (4D) information of all thelight rays associated with a scene in 3D. An exemplary light-field imageis illustrated with reference to FIG. 1. In some embodiments, the imagesmay be captured by an image capturing device, or may be retrieved from amemory of a device, for example, the device 200 (refer to FIG. 2) forprocessing of the image. In an embodiment, the image may be captured bya light-field image capturing device. An example of the light-fieldimage capturing device may include a plenoptic camera.

In an embodiment, the image includes a plurality of pixels. In anembodiment, from among the plurality of pixels, a second pixel being atleast one of a vignette pixel and a bad pixel may be determined. In anembodiment, determining the second pixel associated with the vignettepixel comprises performing determination of pixel intensity of pixelsappearing at an edge portion of an image. For example, the intensity ofpixels on traversing in a radial direction while moving from centralportion of an image towards the edge/corner portions of an image sensormay show a reduction in an intensity of pixels, thereby showing brightand well-illuminated image at the central portion, and ill-illuminatedimage near the edges of the image. The phenomenon of this radial drop inintensity may be termed as a ‘lens shading phenomenon’.

In an embodiment, determining the second pixel being the bad pixel maybe performed based on the pixel intensities of the pixels havingresemblance with the second pixel that are casted under different (forexample, neighboring) micro-lenses. For example, while traversing fromone micro-lens towards another, if there is a spike in a value of thepixel intensity associated with the same pixel (under differentmicro-lenses), then a pixel value associated with other neighboringpixels may be determined. In an embodiment, a bad pixel may refer to apixel that that does not perform as expected. For example, the pixel mayappear as a black spot or a white spot in the image.

At block 602 of method 600, a plurality of first pixels of the pluralityof pixels may be determined, wherein the plurality of first pixelsincludes resembling pixels of the second pixel. In other words, eachfirst pixel of the plurality of first pixels comprises an image of sameportion of the scene casted under different micro-lenses of the imagecapturing device. For example, the scene may depict a person, andvarious micro-lenses of the image capturing device may capture/cast theimage of person from different orientations. Accordingly, the same pointor portion of a scene casted under or captured by different micro-lensesmay be associated with a different co-ordinate position. A differencebetween such co-ordinate positions associated with a same pixel indifferent micro-lenses may be termed as a ‘depth offset’ or a shift ordisparity, and may be determined based on the depth informationassociated with the image/scene. The depth information may be generatedbased on a depth map of the scene. In various embodiments, the depth mapmay be estimated by utilizing various algorithms. In an exampleembodiment, a correlation across different pixels under two micro-lensesmay be utilized for estimating the disparity or the depth-offset.

At block 604, the second pixel may be replaced by at least one firstpixel of the plurality of first pixels based at least on a determinationof the at least one first pixel not being associated with the imagedefect. In an embodiment, the determination of the at least one firstpixel not being associated with the image defect comprises determiningthat the at least one first pixel is not associated with at least one ofthe vignette pixel and the bad pixel. In an embodiment, replacing thesecond pixel with at least one first pixel may be construed as referringto replacing the pixel intensity of the second pixel with (combined orindividual) pixel intensities of the at least one first pixel. In anexample embodiment, the pixel intensity of the second pixel may bereplaced with a function value of pixel intensities of the at least onefirst pixel. In an embodiment, the function value may refer to a valueof one of the arithmetic functions such as median, mode, average or anyother operator that may be utilized for determination of a consolidatedvalue of the pixel intensity associated with the at least one firstpixels. In another embodiment, instead of replacing the pixel intensityof the second pixel with the function of pixel intensities of the atleast one first pixel, the pixel intensity of the first pixel may bereplaced with the pixel intensity of one of the two first pixels whichis located at a central portion of the image. In an embodiment, if it isdetermined that all of the plurality of first pixels are either a badpixel or a vignette pixel or both, the second pixel may be replaced byusing an ‘interpolation technique’. The interpolation techniquecomprises interpolating pixel values from neighboring pixels of thecurrent micro-lens to thereby generate pixel values for current pixels.

In an example embodiment, a processing means may be configured toperform some or all of: determining a plurality of first pixels of theplurality of pixels based on a depth information of an image, theplurality of first pixels having resemblance with the second pixel, thesecond pixel being associated with at least one image defect; andreplacing the second pixel by at least one first pixel of the pluralityof first pixels based at least on a determination of the at least onefirst pixel not being associated with the at least one image defect. Anexample of the processing means may include the processor 302, which maybe an example of the controller 208. Another method for generating aprocessed image is explained in detail with reference to FIG. 7.

FIG. 7 illustrates a flowchart depicting an example method 700 forprocessing of images, in accordance with another example embodiment. Inan embodiment, the image herein may be construed as referring to alight-field image. The method 700 depicted in flow chart may be executedby, for example, the apparatus 300 of FIG. 3. Operations of theflowchart, and combinations of operation in the flowchart, may beimplemented by various means, such as hardware, firmware, processor,circuitry and/or other device associated with execution of softwareincluding one or more computer program instructions. For example, one ormore of the procedures described in various embodiments may be embodiedby computer program instructions. In an example embodiment, the computerprogram instructions, which embody the procedures, described in variousembodiments may be stored by at least one memory device of an apparatusand executed by at least one processor in the apparatus. Any suchcomputer program instructions may be loaded onto a computer or otherprogrammable apparatus (for example, hardware) to produce a machine,such that the resulting computer or other programmable apparatus embodymeans for implementing the operations specified in the flowchart. Thesecomputer program instructions may also be stored in a computer-readablestorage memory (as opposed to a transmission medium such as a carrierwave or electromagnetic signal) that may direct a computer or otherprogrammable apparatus to function in a particular manner, such that theinstructions stored in the computer-readable memory produce an articleof manufacture the execution of which implements the operationsspecified in the flowchart. The computer program instructions may alsobe loaded onto a computer or other programmable apparatus to cause aseries of operations to be performed on the computer or otherprogrammable apparatus to produce a computer-implemented process suchthat the instructions, which execute on the computer or otherprogrammable apparatus provide operations for implementing theoperations in the flowchart. The operations of the method 700 aredescribed with help of apparatus 300. However, the operations of themethod can be described and/or practiced by using any other apparatus.

Referring now to FIG. 7, at block 702, the method 700 includes receivingan image having a plurality of pixels. In an embodiment, the image is alight-field image. The light-field image comprises an angularinformation, for example, a four dimension (4D) information of all thelight rays associated with a scene in 3D. An exemplary light field imageis illustrated with reference to FIG. 1. In an embodiment, the image maybe captured by a light-field image capturing device such as a plenopticcamera. In an embodiment, an array of micro-lenses configured in thelight-field image capturing device may facilitate in capturing thelight-field image. Capturing of a light-field image is explained withreference to FIG. 4.

At block 704, a depth map associated with a scene depicted in the imagemay be generated based on an angular information of the scene. The depthmap may refer to a map of relative distances between the various objectsassociated with the scene. In an embodiment, the depth map may begenerated by utilizing the feature points associated with a scenedepicted in the image. In an embodiment, the examples of the featurepoints may include, but are not limited to, corners, edges of the image,or other region of interest such as background of the scene.

In an embodiment, the plurality of pixels may be spanned one by one forthe purpose of processing. At block 706, it is determined whether acurrent pixel, for example, a second pixel of the plurality of pixels isat least one of a bad pixel and a vignette pixel. In an embodiment, abad pixel may refer to a pixel that does not perform as expected. Forexample, the bad pixel may appear as a black spot or a white spot in theimage. Various examples of bad pixels include stuck high pixel, stucklow pixel, hot pixel and cold pixel. Various other examples of badpixels may include bad pixels that may form a part of a group/cluster ofbad pixels, or a group of bad pixels arranges in a row or a column. Inan embodiment, determining the second pixel associated with the vignettepixel comprises performing determination of pixel intensity of pixelsappearing at an edge portion of an image. For example, the intensity ofpixels on traversing in a radial direction, for example moving fromcenter towards the edges/corners of an image sensor, may reduce anintensity of pixels (as compared to an expected intensity). Thephenomenon of this radial drop in intensity may be termed as a ‘lensshading phenomenon’. As a result of lens shading phenomenon, thecaptured image may be bright and well-illuminated at the centralportions and the illumination drops off near the edges of thefield-of-view of the image.

In an embodiment, the bad pixel may be determined based on the pixelintensities of the pixels having resemblance with the second pixel thatare casted under different (for example, neighboring) micro-lenses andthose having comparable depth-offsets as that of the second pixel. Forexample, while traversing from one of the micro-lenses towards other, ifthere is a spike in a value of the pixel intensity associated with thesame pixel (under different micro-lenses), then a pixel value associatedwith other neighboring pixels may be determined. If it is determined,that there is a difference between the intensity values of said pixel ascompared to the pixels values in the neighboring micro-lenses, then thepixel may be determined to be a bad pixel.

If it is determined at block 706 that the current pixel is at least oneof a bad pixel or a vignette pixel, then at block 708, at least onefirst pixels of the plurality of first pixels that are havingresemblance with the current pixel (for example, the second pixel) inneighboring micro-lens are determined. In an embodiment, the at leastone first pixel is determined based on the depth map as the associatedfirst pixels should have the same depth-offset as the current pixel. Atblock 710, a depth information associated with the plurality of firstpixels is determined. The depth information may include a depth offsetof the first pixel with respect to the current pixel in the neighboringmicro-lenses.

At block 712, it is determined whether or not at least one first pixelof the plurality of first pixels is a bad pixel or a vignette pixel. Ifit is determined at block 712 that at least one first pixel is not a badpixel or vignette pixel, then the current pixel is replaced with the atleast one first pixel at block 714. In an embodiment, replacing thesecond pixel with at least one first pixel may be construed as referringto replacing the pixel intensity of the second pixel with (combined orindividual) pixel intensities of the at least one first pixel. Ifhowever, it is determined at block 712 that all of the at least onefirst pixels are either a bad pixel or vignette pixel, then at block716, it is determined whether all of the plurality of first pixels arespanned. If it is determined that all of the plurality of second pixelsare spanned, then at block 718, the current pixel (for example, thesecond pixel) is replaced by using interpolation technique. If however,at block 716 it is determined that not all the pixels of the pluralityof pixels are spanned, then at block 718 a pixel next to the currentpixel is spanned and processing of the next pixel is performed upon adetermination that the next pixel is at least one of a bad pixel and avignette pixel (for example, by following blocks 706 through 720).

To facilitate discussion of the method 700 of FIG. 7, certain operationsare described herein as constituting distinct steps performed in acertain order. Such implementations are exemplary and non-limiting.Certain operations may be grouped together and performed in a singleoperation, and certain operations can be performed in an order thatdiffers from the order employed in the examples set forth herein.Moreover, certain operations of the method 700 are performed in anautomated fashion. These operations involve substantially no interactionwith the user. Other operations of the method 700 may be performed in amanual fashion or semi-automatic fashion. These operations involveinteraction with the user via one or more user interface presentations.Various examples for generation of processed images based on the methods(such as methods 600 and 700) and devices disclosed herein are describedwith reference to FIGS. 6 and 7.

Without in any way limiting the scope, interpretation, or application ofthe claims appearing below, a technical effect of one or more of theexample embodiments disclosed herein is to processing of images. Thedisclosed embodiments facilitates in generating images from light fieldimages that are devoid of defects such as lens shading defects and badpixel defects. For example, various embodiments facilitate in generatinglight-field images of a scene, and utilize resembling pixels of imagepoints casted under different micro-lenses of the light field camera forgenerating defect-free images. For example, various embodiments disclosegeneration of images devoid of lens shading defects by determiningpixels associated with lens shading defect, and replacing such pixelswith a most centrally located resembling pixel. In another example,generation of images of devoid bad pixel defects is disclosed, whereinpixels comprising bad pixel defects are identified and replaced with oneor more resembling pixels casted under neighboring micro-lenses. Invarious embodiments, the resembling pixels may be determined based on adepth information associated with the image. The disclosed methods anddevices have the advantage that the defects such as cluster defectsassociated with the images maybe corrected in an effective manner,thereby resulting in a cost saving for the sensor manufacturers.Moreover, the disclosed methods may be utilized for detection of badpixels and vignette pixels (those associated with low intensity ascompared to an expected intensity) at the time of manufacture or in alaboratory by a calibration procedure, for example, by exposing thecamera to a flat field of known luminance.

Various embodiments described above may be implemented in software,hardware, application logic or a combination of software, hardware andapplication logic. The software, application logic and/or hardware mayreside on at least one memory, at least one processor, an apparatus or,a computer program product. In an example embodiment, the applicationlogic, software or an instruction set is maintained on any one ofvarious conventional computer-readable media. In the context of thisdocument, a “computer-readable medium” may be any media or means thatcan contain, store, communicate, propagate or transport the instructionsfor use by or in connection with an instruction execution system,apparatus, or device, such as a computer, with one example of anapparatus described and depicted in FIGS. 2 and/or 3. Acomputer-readable medium may comprise a computer-readable storage mediumthat may be any media or means that can contain or store theinstructions for use by or in connection with an instruction executionsystem, apparatus, or device, such as a computer. In one exampleembodiment, the computer readable medium may be non-transitory.

If desired, the different functions discussed herein may be performed ina different order and/or concurrently with each other. Furthermore, ifdesired, one or more of the above-described functions may be optional ormay be combined.

Although various aspects of the embodiments are set out in theindependent claims, other aspects comprise other combinations offeatures from the described embodiments and/or the dependent claims withthe features of the independent claims, and not solely the combinationsexplicitly set out in the claims.

It is also noted herein that while the above describes exampleembodiments of the invention, these descriptions should not be viewed ina limiting sense. Rather, there are several variations andmodifications, which may be made without departing from the scope of thepresent disclosure as defined in the appended claims.

We claim:
 1. A method comprising: determining a plurality of first pixels having resemblance with a second pixel associated with an image based on a depth information of the image, the second pixel being associated with at least one image defect; and replacing the second pixel by one first pixel of the plurality of first pixels based on a determination that the at least one first pixel is not associated with the at least one image defect; wherein the depth information comprises a depth offset of the at least one first pixel with respect to the second pixel, and wherein the depth offset is associated with at least two micro-lenses of an apparatus.
 2. The method as claimed in claim 1, further comprising determining the second pixel of a plurality of pixels associated with the image as being associated with the at least one image defect.
 3. The method as claimed in claim 1, wherein the at least one image defect is associated with at least one of a vignette pixel and a bad pixel in the image.
 4. The method as claimed in claim 1, wherein the at least one image defect is associated with at least one of a vignette pixel and a bad pixel in the image, wherein determining the first pixel as being the vignette pixel comprises performing determination of intensity of pixels appearing at an edge portion of the image.
 5. The method as claimed in claim 1, wherein the at least one image defect is associated with at least one of a vignette pixel and a bad pixel in the image, wherein determining the second pixel as being the bad pixel comprises determining the second pixel as at least one of a stuck high pixel, a stuck low pixel, a hot pixel, a cold pixel, a pixel from a group of bad pixels forming a cluster, and a pixel from a group of bad pixels forming a row or a column in the image.
 6. The method as claimed in claim 1, wherein replacing the second pixel by the at least one first pixel comprises one of: replacing a value of intensity of the second pixel with a value of intensity of the at least one first pixel; replacing a value of intensity of the second pixel with a value of a function of intensities of the at least one first pixel; and replacing a value of pixel intensity of the second pixel with a value of pixel intensity of a first pixel located at a central portion of the image.
 7. An apparatus comprising: at least one processor; and at least one memory comprising computer program code, the at least one memory and the computer program code configured to, with the at least one processor, cause the apparatus to at least perform: determine a plurality of first pixels having resemblance with a second pixel associated with an image based on a depth information of the image, the second pixel being associated with at least one image defect; and replace the second pixel by one first pixel of the plurality of first pixels based on a determination that the at least one first pixel is not associated with the at least one image defect; wherein the depth information comprises a depth offset of the at least one first pixel with respect to the second pixel, and wherein the depth offset is associated with at least two micro-lenses of the apparatus.
 8. The apparatus as claimed in claim 7, wherein the apparatus is further caused, at least in part to determine the second pixel of a plurality of pixels associated with the image as being associated with the at least one image defect.
 9. The apparatus as claimed in claim 7, wherein the at least one image defect is associated with at least one of a vignette pixel and a bad pixel in the image.
 10. The apparatus as claimed in claim 7, wherein the at least one image defect is associated with at least one of a vignette pixel and a bad pixel in the image, wherein the apparatus is further caused, at least in part to determine the second pixel as being the vignette pixel by performing determination of intensity of pixels appearing at an edge portion of the image.
 11. The apparatus as claimed in claim 7, wherein the at least one image defect is associated with at least one of a vignette pixel and a bad pixel in the image, wherein the apparatus is further caused, at least in part to determine the second pixel as being the bad pixel by determining the second pixel as at least one of a stuck high pixel, a stuck low pixel, a hot pixel, cold pixel, a pixel from a group of bad pixels forming a cluster, and a pixel from a group of bad pixels forming a row or a column in the image.
 12. The apparatus as claimed in claim 7, wherein the apparatus is further caused, at least in part to replace the second pixel by the at least one first pixel by performing one of: replace a value of intensity of the second pixel with a value of intensity of the at least one first pixel; replace a value of intensity of the second pixel with a value of a function of intensities of the at least one first pixel; replace a value of pixel intensity of the second pixel with a value of intensity of a first pixel located at a central portion of the image.
 13. A computer program product comprising at least one non-transitory computer-readable storage medium, the non-transitory computer-readable storage medium comprising a set of instructions, which, when executed by one or more processors, cause an apparatus to at least perform: determine a plurality of first pixels having resemblance with a second pixel associated with an image based on a depth information of the image, the second pixel being associated with at least one image defect; and replace the second pixel by one first pixel of the plurality of first pixels based on a determination that the at least one first pixel is not associated with the at least one of image defect; wherein the depth information comprises a depth offset of the at least one first pixel with respect to the second pixel, and wherein the depth offset is associated with at least two micro-lenses of an apparatus.
 14. The computer program product as claimed in claim 13, wherein the apparatus is further caused, at least in part to determine the second pixel of a plurality of pixels associated with the image as associated with the at least one image defect.
 15. The computer program product as claimed in claim 13, wherein the at least one image defect is associated with at least one of a vignette pixel and a bad pixel in the image.
 16. The computer program product as claimed in claim 13, wherein the at least one image defect is associated with at least one of a vignette pixel and a bad pixel in the image, wherein the apparatus is further caused, at least in part to determine the second pixel as being the vignette pixel by performing determination of intensity of pixels appearing at an edge portion of the image.
 17. The computer program product as claimed in claim 13, wherein the at least one image defect is associated with at least one of a vignette pixel and a bad pixel in the image, wherein the apparatus is further caused, at least in part to determine the second pixel as being the bad pixel by determining the second pixel as at least one of a stuck high pixel, a stuck low pixel, a hot pixel, a cold pixel, a pixel from a group of bad pixels forming a cluster, and a pixel from a group of bad pixels forming along a row or a column.
 18. The method as claimed in claim 1, wherein the plurality of first pixels having resemblance with the second pixel comprise pixels that correspond to a same portion of the image.
 19. The method as claimed in claim 1, wherein the plurality of first pixels having resemblance with the second pixel comprise pixels associated with substantially same intensity values.
 20. The method as claimed in, claim 1, wherein the depth offset is directly proportional to a distance between the at least two micro-lenses. 